Add more xc_error_code values.
authorEmmanuel Ackaouy <ack@xensource.com>
Thu, 25 Jan 2007 22:16:52 +0000 (22:16 +0000)
committerEmmanuel Ackaouy <ack@xensource.com>
Thu, 25 Jan 2007 22:16:52 +0000 (22:16 +0000)
XC_INVALID_PARAM
  such as asking for features unsupported by either xen or guest kernel.
XC_OUT_OF_MEMORY
  no comment ;)

Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
---
 tools/libxc/xc_private.c |    4 ++++
 tools/libxc/xenctrl.h    |    2 ++
 2 files changed, 6 insertions(+)

tools/libxc/xc_private.c
tools/libxc/xenctrl.h

index 60fc8cdb9611660e0933547fc07bc39ebf76ce43..1048de3cc344ea8ecb4381bd36cc418c67e13adf 100644 (file)
@@ -45,6 +45,10 @@ const char *xc_error_code_to_desc(int code)
         return "Internal error";
     case XC_INVALID_KERNEL:
         return "Invalid kernel";
+    case XC_INVALID_PARAM:
+        return "Invalid configuration";
+    case XC_OUT_OF_MEMORY:
+        return "Out of memory";
     }
 
     return "Unknown error code";
index 9979c61903a2a75122c12431b442d7e4cfd81cd4..26cd638db5216ce3f7e171ddcad3b24b64cef5f1 100644 (file)
@@ -730,6 +730,8 @@ typedef enum {
   XC_ERROR_NONE = 0,
   XC_INTERNAL_ERROR = 1,
   XC_INVALID_KERNEL = 2,
+  XC_INVALID_PARAM = 3,
+  XC_OUT_OF_MEMORY = 4,
 } xc_error_code;
 
 #define XC_MAX_ERROR_MSG_LEN 1024